import { Request as request } from '@/utils/request'

export const getSchools = (pageParams:any, data:any) => {
  return request({
    url: '/school/list',
    method: 'post',
    params: pageParams,
    data
  })
}

export const getTotalSchools = () => {
  return request({
    url: '/school/total-list',
    method: 'get'
  })
}

export const getSchoolInfo = (id:string) => {
  return request({
    url: `/school/info/${id}`,
    method: 'get'
  })
}

export const saveSchool = (data:any) => {
  return request({
    url: '/school/save',
    method: 'post',
    data
  })
}

export const removeSchool = (id:string) => {
  return request({
    url: `/school/remove/${id}`,
    method: 'delete'
  })
}
